<?php
class Path extends AppModel {

	var $name = 'Path';
    var $primaryKey = 'path_id';
    var $hasMany = array('Post');

  	/**
	 * Checking url is exist or not
	 * @param string url
	 */
	public function checkFolder($url){
		$status = $this->find('first',array(
			'conditions'=>array('Path.name'=> $url),
			'fields'=>'Path.path_id'));

		return $status;
	}
}
?>